﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;
using ZGRemote.Server.Core.Models;

namespace ZGRemote.Server.UI.Converters
{
    [ValueConversion(typeof(FileType), typeof(string))]
    public class FileTypeToStringConvert : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {

            switch ((FileType)value)
            {
                case FileType.File:
                    return Core.Properties.Resources.File;
                case FileType.Folder:
                    return Core.Properties.Resources.Folder;
            }
            return "";
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value;
        }
    }
}
